package com.rd.teacher.sunke.test0707;

import java.util.ArrayList;

public class ArrayListTest {
    public static void main(String[] args) {
        ArrayList arrayList = new ArrayList();

        byte b = 1;
        arrayList.add(b);

        short s = 2;
        arrayList.add(s);

        int i = 3;
        arrayList.add(i);

        long l = 11;
        arrayList.add(l);

        char c = 'c';
        arrayList.add(c);

        double d = 1.1;
        arrayList.add(d);

        float f = 1.2f;
        arrayList.add(f);

        boolean b1 = true;
        arrayList.add(b1);

        Student student = new Student("孙可", "物联网工程");
        arrayList.add(student);

        for (int j = 0; j < arrayList.size(); j++) {
            System.out.println(arrayList.get(j));
        }

        arrayList.remove(8);

        for (int j = 0; j < arrayList.size(); j++) {
            System.out.println(arrayList.get(j));
        }

        arrayList.set(3, "100");
        for (int j = 0; j < arrayList.size(); j++) {
            System.out.println(arrayList.get(j));
        }
    }
}
